package com.eva.service.system;

import com.eva.dao.system.SystemSettingsMapper;
import com.eva.dao.system.model.SystemSettings;
import com.eva.framework.mp.service.BaseService;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;

@Service
public class SystemSettingsService extends BaseService<SystemSettings, SystemSettingsMapper> {

    public SystemSettingsService(SystemSettingsMapper mapper, Environment environment) {
        super(mapper, environment);
    }

    /**
     * 根据编码查询
     *
     * @param code 编码
     * @return SystemSettings
     */
    public SystemSettings findByCode (String code) {
        return this.findOne(SystemSettings.builder().code(code).build());
    }
}
